package com.meilingcloud.biobank.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * 家系 对象 bank_family
 *
 * @author chenl
 * @date 2021-06-22
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
@TableName("bank_family")
public class Family implements Serializable {

    private static final long serialVersionUID = 1L;


    /**
     * 家系ID
     */
    @TableId(value = "family_id", type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long familyId;

    /**
     * 家系名称
     */
    @NotBlank(message = "家系名称不能为空")
    private String familyName;

    /**
     * 临床病症
     */
    private String familyClinical;

    /**
     * 家系描述
     */
    private String familyDesc;

    /**
     * 删除标志
     */
    @TableLogic(value = "0", delval = "1")
    private String delFlag;

    /**
     * 创建者
     */
    private String createBy;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新者
     */
    private String updateBy;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    private Date updateTime;

    @TableField(exist = false)
    private Map<String, Object> params = new HashMap<>();
}
